home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HyperLib 1997 Winter - Disc 1
/
HYPERLIB-1997-Winter-CD1.ISO.7z
/
HYPERLIB-1997-Winter-CD1.ISO
/
第1特集Plug-in
/
Photoshop
/
LYNXX Plug-In Folder.sit
/
LYNXX Plug-In Folder
/
LYNXX.h
< prev
next >
Wrap
Text File
|
1993-10-24
|
6KB
|
179 lines
/*
File: LYNXX.h
Portions copyright 1990-91 by Thomas Knoll.
This file describes version 4.0 of Photoshop's Acquisition module interface.
(Small additions by Scott Wurcer 10/93 (at end))
*/
/* Operation selectors */
#define acquireSelectorAbout 0
#define acquireSelectorStart 1
#define acquireSelectorContinue 2
#define acquireSelectorFinish 3
#define acquireSelectorPrepare 4
/* Image modes */
#define acquireModeBitmap 0
#define acquireModeGrayScale 1
#define acquireModeIndexedColor 2
#define acquireModeRGBColor 3
#define acquireModeCMYKColor 4
#define acquireModeHSLColor 5
#define acquireModeHSBColor 6
#define acquireModeMultichannel 7
#define acquireModeDuotone 8
/* Error return values. The plug-in module may also return standard Macintosh
operating system error codes, or report its own errors, in which case it
can return any positive integer. */
#define acquireBadParameters -30000 /* "a problem with the acquisition module interface" */
#define acquireNoScanner -30001 /* "there is no scanner installed" */
#define acquireScannerProblem -30002 /* "a problem with the scanner" */
typedef unsigned char AcquireLUT [256];
typedef short AcquireMap [16];
typedef struct AcquireMonitor {
Fixed gamma; /* Gamma value */
Fixed redX; /* Red phosphor */
Fixed redY;
Fixed greenX; /* Green phosphor */
Fixed greenY;
Fixed blueX; /* Blue phosphor */
Fixed blueY;
Fixed whiteX; /* White point */
Fixed whiteY;
Fixed ambient; /* 0.0 = Low, 0.5 = Medium, 1.0 = High */
} AcquireMonitor;
typedef struct AcquireRecord {
long serialNumber; /* Host's serial number, to allow
copy protected plug-in modules. */
ProcPtr abortProc; /* The plug-in module may call this no-argument
BOOLEAN function (using Pascal calling
conventions) several times a second during long
operations to allow the user to abort the operation.
If it returns TRUE, the operation should be aborted
(and a positive error code returned). */
ProcPtr progressProc; /* The plug-in module may call this two-argument
procedure (using Pascal calling conventions)
periodically to update a progress indicator.
The first parameter (type LONGINT) is the number
of operations completed; the second (type LONGINT)
is the total number of operations. */
long maxData; /* Maximum number of bytes that should be
passed back at once, plus the size of any
interal buffers. The plug-in may reduce this
value in the acquireSelectorPrepare routine. */
short imageMode; /* Image mode */
Point imageSize; /* Size of image */
short depth; /* Bits per sample, currently must be 1 or 8 */
short planes; /* Samples per pixel */
Fixed imageHRes; /* Pixels per inch */
Fixed imageVRes; /* Pixels per inch */
AcquireLUT redLUT; /* Red LUT, only used for Indexed Color images */
AcquireLUT greenLUT; /* Green LUT, only used for Indexed Color images */
AcquireLUT blueLUT; /* Blue LUT, only used for Indexed Color images */
Ptr data; /* A pointer to the returned image data. The
plug-in module is now responsible for freeing
this buffer (this is a change from previous
versions). Should be set to NIL when
all the image data has been returned. */
Rect theRect; /* Rectangle being returned */
short loPlane; /* First plane being returned */
short hiPlane; /* Last plane being returned */
short colBytes; /* Spacing between columns */
long rowBytes; /* Spacing between rows */
long planeBytes; /* Spacing between planes (ignored if only one
plane is returned at a time) */
Str255 filename; /* Document file name */
short vRefNum; /* Volume reference number, or zero if none */
Boolean dirty; /* Changes since last saved flag. The plug-in may clear
this field to prevent prompting the user when
closing the document. */
OSType hostSig; /* Creator code for host application */
ProcPtr hostProc; /* Host specific callback procedure */
long hostModes; /* Used by the host to inform the plug-in which
imageMode values it supports. If the corresponding
bit (LSB = bit 0) is 1, the mode is supported. */
AcquireMap planeMap; /* Maps plug-in plane numbers to host plane
numbers. The host initializes this is a linear
mapping. The plug-in may change this mapping if
it sees the data in a different order. */
Boolean canTranspose; /* Is the host able to transpose the image? */
Boolean needTranspose; /* Does the plug-in need the image transposed? */
Handle duotoneInfo; /* Handle to duotone information, if returning a
duotone mode image. The plug-in is responsible
for freeing this buffer. */
long diskSpace; /* Free disk space on the host's scratch disk or
disks. Set to a negative number if host does
not use a scratch disk. */
ProcPtr spaceProc; /* If not NIL, a pointer to a no-argument
LONGINT function (using Pascal calling
conventions) which uses the current settings of
the imageMode, imageSize, depth, and planes
fields to compute the amount of scratch disk
space required to hold the image. Returns -1
if the settings are not valid. */
AcquireMonitor monitor; /* Information on current monitor */
char reserved [256]; /* Set to zero */
} AcquireRecord, *AcquireRecordPtr;
#define Length(string) (*(unsigned char *)(string))
/* These are all the defines I needed to add */
#define NUMCOL 192
#define NUMROW 165
typedef short **short_H;
/* The value of global variables are not preserved between invocations
of the plug-in, since the plug-in's resource file is closed. To keep
values around longer, make them part of the following structure. */
typedef struct TPermanent {
short lastRows;
short lastCols;
short lastMode;
short_H MyImageHandle; /* I save the image as a relocatable block */
short maxImageValue; /* These are for scaling */
short minImageValue;
} TPermanent;